﻿using System;

namespace Jumbot.API.Discuz
{
    public interface IDbCommand
    {
        /// <summary>
        /// 同步注册
        /// </summary>
        /// <param name="username">帐号</param>
        /// <param name="gender">性别</param>
        /// <param name="nickname">昵称</param>
        /// <param name="password">密码(未加密)</param>
        /// <param name="email">邮箱</param>
        /// <param name="groupid">会员隶属组</param>
        /// <param name="regip">注册IP</param>
        /// <param name="qq">QQ号</param>
        /// <param name="msn">MSN</param>
        /// <returns>是否注册成功</returns>
        bool Register(string username, int gender, string nickname, string password, string email, int groupid, string regip, string qq, string msn);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="username">帐号</param>
        /// <param name="password">密码(未加密)</param>
        /// <returns>是否修改成功</returns>
        bool ModifyPwd(string username, string password);


        /// <summary>
        /// 同步登陆
        /// </summary>
        /// <param name="username">帐号</param>
        /// <param name="password">密码(未加密)</param>
        /// <param name="expDays">有效期</param>
        /// <param name="inVisible">是否隐身</param>
        /// <param name="reFerer">返回页面</param>
        /// <returns>是否登陆成功</returns>
        bool Login(string username, string password, int expDays, bool inVisible, string reFerer);


        /// <summary>
        /// 同步退出
        /// </summary>
        void LoginOut();
    }
}
